1. Field of the Invention
The present invention relates generally to an improved data processing system, and in particular to a method and apparatus for executing programming languages. Still more particularly, the present invention relates to a computer implemented method, apparatus, and computer usable program code for processing files in a virtual machine.
2. Description of the Related Art
Computer developers have made a number of different computer microprocessors suited to particular sorts of problems. Machine instructions, are, in a sense, the language for a particular processing unit architecture. Some microprocessors execute complex instruction sets, while others execute reduced instruction sets.
The instructions are usually difficult for a human being to read and understand, let alone write as a program. Consequently, higher-order languages have been conceived that mimic aspects of human languages such as English. Such languages, including Java™, permit rapid development of useful programs, though the resultant code is not immediately executable on a microprocessor. Java is a trademark of Sun Microsystems, Incorporated. In order for such higher-order codes or programs to be used by a microprocessor, the programs must be interpreted and compiled into a machine language that is suited for the particular processor architecture.
Java programs are architecture independent in the sense that all microprocessors that have a Java Virtual Machine (JVM) are able to compile such programs to the machine language of the microprocessor. The compiling step may introduce a delay in executing a program, however, this is the cost of making a program independent of the architecture.
Developers have wanted a more rapid way to execute Java programs. Java programs are often packaged as a bundle of class files. Each class file provides instructions to perform a particular function of a program. However, in order to perform each function, as mentioned above, a Java virtual machine (JVM) must compile the function into machine instructions and then execute the compiled machine instructions. It would be advantageous to have such compiled machine instructions available at the outset of executing a program. Compiled machine instructions are among pre-translated versions of the high-level language. Consequently, pre-translated files might be faster to perform if such compiled machine instructions were accessible to a Java virtual machine without compilation.